'''
    1 默认等待时间
    2 强制等待时间
    3 获取input的value
    3 获取元素属性值


'''

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=False)
    page = browser.new_page()


    page.goto('https://qzone.qq.com')

    page.frame(name='login_frame').locator('#switcher_plogin').click()


    page.frame_locator('#login_frame').locator('#u').fill('admin')
    page.frame_locator('#login_frame').locator('#p').fill('admin')



    page.wait_for_timeout(5000)
